package cn.java75;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author oldliu
 * @since 1.0
 */
public class BeanTest {
    public static void main(String[] args) {
        ApplicationContext ac=new ClassPathXmlApplicationContext("app*.xml");
        Lover l = ac.getBean("aiqing", Lover.class);
        l.biaobai();
        Lover l2 = ac.getBean("aiqing", Lover.class);
        l2.biaobai();
        Lover l3 = ac.getBean("aiqing", Lover.class);
        l3.biaobai();
        System.out.println(l==l2&&l2==l3);
    }
}
